package com.neuedu.weatherapi.controller;
import com.neuedu.weatherapi.pojo.AirQualityCounts;
import com.neuedu.weatherapi.service.AirQualityCountsService;


import com.neuedu.weatherapi.util.ResponseBody;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class AirQualityCountsController {
    @Autowired
    private AirQualityCountsService airQualityCountsService;
    @GetMapping("/queryAllAirQualityCounts")
    public ResponseBody<List<AirQualityCounts>> queryAllAirQualityCounts(){
        List<AirQualityCounts> airQualityCounts=airQualityCountsService.queryAllAirQualityCounts();
        ResponseBody responseBody=new ResponseBody("200","成功",airQualityCounts);
        return responseBody;
    }
}
